package com.util
{
	import flash.display.Bitmap;
	import flash.utils.ByteArray;
	public class TitleUtil
	{

     
        [Embed("assets/title.xml", mimeType="application/octet-stream")]
        public static const TitleXml:Class;
        static var ba:ByteArray=new TitleXml ()as ByteArray;
        public static var xml:XML = new XML( ba.readUTFBytes( ba.length ) );
		public static function getTitle(level:int):String{
		 
            for each ( var title:XML in xml.elements() ) {
            	if(level>=title.lv0 && level<=title.lv1){
            		return title.tt;
            	}
            }
            return "";
			 
		}
		
		
		
		//car part
//        [Embed(source='assets/map/tilekit.jpg')]
//        private static const TileKit:Class;
// 
//		public static function getTileKit(id:int):Bitmap{
// 
//	            return new TileKit as Bitmap;
//        
//		}
//		
		//item part
 
		
 
	}
}